package whf.framework.tools.generator;

import whf.framework.util.StringUtils;
import whf.framework.util.Utils;

/**
 * @author wanghaifeng
 *
 */
public class FieldInfo {
	private String fieldName;

	private String fieldType;

	private boolean update;

	public FieldInfo(String fieldName, String fieldType, boolean update) {
		this.fieldName = fieldName;
		this.fieldType = fieldType;
		this.update = update;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	public String getFieldType() {
		return fieldType;
	}

	public void setFieldType(String fieldType) {
		this.fieldType = fieldType;
	}

	public boolean isUpdate() {
		return update;
	}

	public void setUpdate(boolean update) {
		this.update = update;
	}
	
	public String asProperty(){
		String prop = Utils.getPropertyName(this.fieldName);
		prop = StringUtils.capitalize(prop);
		return prop;
	}
}
